package com.zcg.blogger.model;

import java.io.Serializable;
import java.util.List;

import org.hibernate.validator.constraints.NotEmpty;

/**
 * 标签
 * 
 * @author 张晨刚
 *
 */
public class Lable implements Serializable{

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	private int id;

	/**
	 * 标签名称
	 */
	private String name;

	/**
	 * 标签内文章列表
	 */
	private List<Article> articles;

	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}
	
	@NotEmpty(message="标签不能为空")
	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public List<Article> getArticles() {
		return articles;
	}

	public void setArticles(List<Article> articles) {
		this.articles = articles;
	}

	@Override
	public String toString() {
		return "Lable [id=" + id + ", name=" + name + ", articles=" + articles
				+ "]";
	}
}
